package isjinhao.jlox.grammar.code.represention;

import isjinhao.jlox.grammar.code.visitor.CodeVisitor;
import isjinhao.jlox.grammar.expression.represention.Expression;
import isjinhao.jlox.grammar.statement.represention.Statement;

/**
 * @Author ISJINHAO
 * @Date 2021/2/28 10:40
 */
public class DoWhileCode extends Code {

    private Expression whileCondition;

    private Statement whileStatement;

    @Override
    public <R> R accept(CodeVisitor<R> codeVisitor) {
        return codeVisitor.visitDoWhileCode(this);
    }

    public DoWhileCode(Expression whileCondition, Statement whileStatement) {
        this.whileCondition = whileCondition;
        this.whileStatement = whileStatement;
    }
}
